/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Helper;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 *
 * @author Administrator
 */
public class CheckStandard {

    public static boolean isStandard(String str) {
        Pattern p = Pattern.compile("[^a-z0-9A-Z_]", Pattern.CASE_INSENSITIVE);
        Matcher m = p.matcher(str);
        boolean b = m.find();
        if (b) {
            return false;
        }
        return true;
    }

    public static void main(String [] args){
        String str = "hanh_nguyen";
        System.out.println("isStandard " + isStandard(str));
    }
}
